#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2019 crane <crane@crane-pc>
#
# Distributed under terms of the MIT license.

"""

"""


level = {
    '+' : 0,
    '-' : 0,
    '*' : 1,
    '/' : 1,
}

s = raw_input()
# s = s.strip()
num_stack = []
ope_stack = []

for i in s:
    if i not in level:
        num_stack.append(i)
    else:
        if ope_stack:
            new_level = level[i]
            while ope_stack and level[ope_stack[-1]] >= new_level:
                num_stack.append(ope_stack.pop())
            ope_stack.append(i)
        else:
            ope_stack.append(i)
while ope_stack:
    num_stack.append(ope_stack.pop())
print("".join(num_stack))

# main()
# exit(0)
